package com.example.administrator.u17.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.administrator.u17.R;

/**
 * Created by Administrator on 2016/11/15.
 */

public class ManHuaInfoFragment extends Fragment {

    private TextView tv, tv2, tv3, tv4, tv5, tv6, tv7, tv8;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_manhuainfo, null);
        initView(view);
        initData();
        return view;
    }

    private void initData() {
        Bundle bundle = getArguments();
        tv.setText(bundle.getString("text"));

        tv3.setText("类型：" + bundle.getString("cate_id"));
        tv8.setText("月票：" + bundle.getString("count"));
        tv2.setText("周 " + bundle.getString("last_update_week"));
        tv5.setText("类别：" + bundle.getString("sb"));
    }

    private void initView(View view) {
        tv = (TextView) view.findViewById(R.id.tv_manhuain_fragment_text);
        tv2 = (TextView) view.findViewById(R.id.tv_manhua_fragment_time);
        tv3 = (TextView) view.findViewById(R.id.tv_fagment_manhuainfo_type);
        tv4 = (TextView) view.findViewById(R.id.tv_fragment_manhua_click);
        tv5 = (TextView) view.findViewById(R.id.tv_fragment_manhua_leibie);
        tv6 = (TextView) view.findViewById(R.id.tv_fragment_manhua_zhaungtai);
        tv7 = (TextView) view.findViewById(R.id.tv_fragment_manhuainfo_souquan);
        tv8 = (TextView) view.findViewById(R.id.tv_fragment_manhuainfo_yuepiao);
    }
}
